import stanford.karel.SuperKarel;

public class FirstKarelPrograme extends SuperKarel {
	public void run() {
		
		while(getLocation().x != 9 && getLocation().y == 1){
			kualan();
		}
		
	}	

	private void kualan() {
		while(frontIsBlocked())
		{
			turnLeft();
		}
		while(rightIsBlocked())
		{
			move();
		}
		turnRight();
		move();
		turnRight();
		
		while(frontIsClear())
		{
			move();
		}
		turnLeft();
		while(frontIsClear())
		{
			move();
		}
	}
	
}
